/**
 * 模态框控制
 * @author heke
 * @version 20170430
 * @type {{isModalShow: boolean}}
 */
const state = {
    isModalShow: false
}

const getters = {
    isModalShow: state => state.isModalShow
}

const actions = {
    showModal ({ commit }) {
        commit('SHOW_MODAL')
    },
    hideModal ({ commit }) {
        commit('HIDE_MODAL')
    }
}

const mutations = {
    'SHOW_MODAL' (state) {
        state.isModalShow = true
    },
    'HIDE_MODAL' (state) {
        state.isModalShow = false
    }
}

export default {
    state,
    getters,
    actions,
    mutations
}
